import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.css']
})
export class HeaderComponent implements OnInit {
  // 不用写相对图片目录，默认从assets文件夹查找
  public imgSrc ='assets/image/icon-yellow_05.png'

  public ifShow:boolean = true
  public stateNum:number = 2  //1失败  ，2成功 ，其他为默认情况

  public str = 'FBI open door!!!'

  public today = new Date().getTime()

  public bdstr:any ='默认内容'
  constructor() { }

  ngOnInit(): void {
  }
  // 自定义方法
  run(e:any):void{
    alert('跑呀！！！')
    // 改变数据
    this.str = 'FBI incoming !!!'
    this.ifShow = !this.ifShow
    console.log(e)
  }
  // 参数必须指定类型
  inputFn(e:any):void{
    console.log(e)
  }
}
